﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<iBuproModel.Project>>" %>
<%@ Import Namespace="IBupro.Extensions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Html.Translate("projectList")%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%: Html.Translate("diplomProjects") %></h2>
    

    <table>
        <thead>
        <tr>
            <th></th>
            <th>
                <%: Html.Translate("name") %>
            </th>
            <th>
                <%: Html.Translate("details") %>
            </th>
            <th>
                <%: Html.Translate("created") %>
            </th>
            <th>
                <%: Html.Translate("shortcut") %>
            </th>
            <th>
                <%: Html.Translate("subscribe") %>
            </th>
        </tr>
        </thead>
        <tbody>
    <% foreach (var item in Model.OfType<iBuproModel.DiplomProject>()) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(Html.Translate("details"), "Details", new { id=item.Id })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: Html.TruncateDetail(item.Detail) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.Created) %>
            </td>
            <td>
                <%: item.Shortcut %>
            </td>
            <td>
                <a href="<%: Url.DiplomProjectSubscribeUrl(item) %>"><%: Html.Translate("subscribe")%></a>
            </td>
        </tr>
    </tbody>
    <% } %>

    </table>

<h2><%: Html.Translate("normalProjects") %></h2>

    <table>
       <thead>
        <tr>
            <th></th>
            <th>
                <%: Html.Translate("name") %>
            </th>
            <th>
                <%: Html.Translate("details") %>
            </th>
            <th>
                <%: Html.Translate("created") %>
            </th>
            <th>
                <%: Html.Translate("shortcut") %>
            </th>
        </tr>
        </thead>

        <tbody>
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(Html.Translate("details"), "Details", new { id = item.Id })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: Html.TruncateDetail(item.Detail) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.Created) %>
            </td>
            <td>
                <%: item.Shortcut %>
            </td>
        </tr>
    
    <% } %>
    </tbody>
    </table>

  

</asp:Content>

